package com.crm.kz.menu;

import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.widget.SearchView;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.crm.kz.R;
import com.crm.kz.common.BaseFragment;
import com.xuexiang.xui.widget.actionbar.TitleBar;

public class Fragment1 extends BaseFragment {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.frament_1, container, false);
        SearchView sv = view.findViewById(R.id.SearchView1);
        sv.setIconified(false);
        sv.setQueryHint("搜索");

        TitleBar.TextAction xx = new TitleBar.TextAction("添加"){
            @Override
            public void performAction(View view) {
                Log.d("TAG", "performAction: vxs");
            }
        };
        titleBar.setActionTextColor(R.color.black);
        titleBar.setDividerColor(R.color.black);
        titleBar.setTitle("杨凯博");
        titleBar.addAction(xx);


        return view;
    }


    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        mContext = context;
    }

    public static Fragment1 newInstance() {
        Fragment1 fragment1 = new Fragment1();
        return fragment1;
    }
}
